import 'package:bouncing_widget/bouncing_widget.dart';
import 'package:delayed_display/delayed_display.dart';
import 'package:flutter/material.dart';
import 'package:like_button/like_button.dart';
import 'package:loading_animation_widget/loading_animation_widget.dart';
import 'package:breathing_collection/breathing_collection.dart';
import 'package:avatar_glow/avatar_glow.dart';
import 'package:slide_countdown/slide_countdown.dart';

class AnimationPage extends StatefulWidget {
  const AnimationPage({Key? key}) : super(key: key);

  @override
  _AnimationPageState createState() => _AnimationPageState();
}

class _AnimationPageState extends State<AnimationPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Animation'),
        elevation: 0,
      ),
      body: SingleChildScrollView(
        child: Column(
          children: [
            Row(
              children: [
                LoadingAnimationWidget.twistingDots(
                  leftDotColor: const Color(0xFF1A1A3F),
                  rightDotColor: const Color(0xFFEA3799),
                  size: 20,
                ),
                SizedBox(
                  width: 50,
                ),
                LoadingAnimationWidget.staggeredDotsWave(
                  color: Colors.pink,
                  size: 20,
                ),
              ],
            ),
            BreathingGlowingButton(
              height: 60.0,
              width: 60.0,
              buttonBackgroundColor: Color(0xFF373A49),
              glowColor: Color(0xFF777AF9),
              icon: Icons.mic,
              iconColor: Colors.white,
              onTap: () => {},
            ),
            AvatarGlow(
              glowColor: Colors.blue,
              endRadius: 90.0,
              duration: Duration(milliseconds: 2000),
              repeat: true,
              showTwoGlows: true,
              repeatPauseDuration: Duration(milliseconds: 100),
              child: Material(
                // Replace this child with your own
                elevation: 8.0,
                shape: CircleBorder(),
                child: CircleAvatar(
                  backgroundColor: Colors.grey[100],
                  child: Image.asset(
                    'assets/images/caugh.png',
                    height: 60,
                  ),
                  radius: 40.0,
                ),
              ),
            ),
            SlideCountdown(
              duration: const Duration(days: 2),
            ),
            DelayedDisplay(
              delay: Duration(seconds: 1),
              child: Text(
                "Hello",
                style: TextStyle(
                  fontWeight: FontWeight.bold,
                  fontSize: 35.0,
                  color: Colors.black,
                ),
              ),
            ),
            DelayedDisplay(
              delay: Duration(seconds: 1 + 1),
              child: Text(
                "World",
                style: TextStyle(
                  fontWeight: FontWeight.bold,
                  fontSize: 35.0,
                  color: Colors.orange,
                ),
              ),
            ),
            LikeButton(),
            BouncingWidget(
              duration: Duration(milliseconds: 100),
              scaleFactor: 1.5,
              onPressed: () {
                print("onPressed");
              },
              child: Text(
                "Hello !",
                style: TextStyle(
                  color: Colors.pink,
                  fontWeight: FontWeight.bold,
                  fontSize: 35,
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
